package org.example.platform.design.jieshiqi;


import java.util.ArrayList;
import java.util.List;

/**
 * 解释器
 */
public class Test {

    public static void main(String[] args) {
        Context context = new Context();
        context.setInput("测试A");
        context.setOutput("测试B");
        List<AbsExpress> list = new ArrayList<>();
        list.add(new Nonter());
        list.add(new Terminal());
        list.add(new Nonter());
        list.add(new Terminal());

        for (AbsExpress absExpress : list) {
            absExpress.Inter(context);
        }
    }
}
